<?php

/**

 * User:ayou chow
 * Date: 2019-11-19
 * Time: 13:39
 */

namespace app\common\model;


use think\Model;

class AdminModel extends Model
{
    public function role()
    {
        return $this->hasOne(AdminRoleModel::class, 'id', 'roleid');
    }

    public static function get_sub_anchors($id)
    {
        $row = AdminModel::get($id);
        return explode(",", $row['sub_anchors']);
    }
}
